from django.db import models

# Create your models here.
class Good(models.Model):
    name = models.CharField(max_length=20,verbose_name='商品名')
    price = models.DecimalField(decimal_places=2,max_digits=7,verbose_name='价格')
    number = models.IntegerField(verbose_name='库存')
    cate = models.CharField(max_length=20,verbose_name='分类')
    class Meta:
        db_table = 'good'
    def __str__(self):
        return self.name

class Shops(models.Model):
    name = models.CharField(max_length=20,verbose_name='商品名')
    price = models.DecimalField(decimal_places=2,max_digits=7,verbose_name='价格')
    number = models.IntegerField(verbose_name='库存')
    cate = models.CharField(max_length=20,verbose_name='分类')
    class Meta:
        db_table = 'shops'
    def __str__(self):
        return self.name